home *** CD-ROM | disk | FTP | other *** search
- /* ******************************************************************* */
- /* ** ** */
- /* ** Janus-Library: Strukturdefinitionen ** */
- /* ** ** */
- /* ******************************************************************* */
-
- /*
- WICHTIG: Beachten Sie die Hinweise in der Datei janus_lib.fd !!!
- ----------------------------------------------------------------
- */
-
- #ifndef JANUS_JANUSBASE_H
- #define JANUS_JANUSBASE_H
- #ifndef EXEC_TYPES_H
- #include <exec/types.h>
- #endif
- #ifndef EXEC_LIBRARIES_H
- #include <exec/libraries.h>
- #endif
- #ifndef EXEC_INTERRUPTS_H
- #include <exec/interrupts.h>
- #endif
- #ifndef EXEC_SEMAPHORES_H
- #include <exec/semaphores.h>
- #endif
- #ifndef EXEC_EXECBASE_H
- #include <exec/execbase.h>
- #endif
- #ifndef LIBRARIES_DOS_H
- #include <libraries/dos.h>
- #endif
-
- struct JanusBase
- {
- struct Library LibNode;
- ULONG SystemBits[2];
- struct DualPortedMemory *ParameterRAM;
- APTR IOAccessRAM;
- APTR BufferRAM;
- struct ExecBase *ExecBase;
- struct DosLibrary *DosBase;
- BPTR SegList;
- struct JIntTable *JIntTable;
- struct Interrupt AmigaInt;
- struct Interrupt JanusInt;
- UWORD RegOffset;
- UWORD AutoBoot;
- UWORD DualPortedSeg;
- struct ZaphodServiceTask *ZaphodTask;
- ULONG JanusReserved[4];
- struct SetupSig *JanusInterrupts[32];
- };
-
- struct ZaphodServiceTask
- {
- struct SignalSemaphore Semaphore;
- struct ServiceArea *JInt14Data;
- ULONG JInt14SigBit;
- struct SetupSig *Jint14SetupSig;
- struct Process *ZaphodServiceTask;
- struct GfxBase *GfxBase;
- ULONG ZaphodReserved[4];
- };
-
- struct ServiceArea
- {
- UBYTE Lock;
- UBYTE Pad;
- RPTR Reserved[8];
- RPTR PCAddService[2];
- RPTR PCDeleteService[2];
- RPTR AmigaAddService[2];
- RPTR AmigaDeleteService[2];
- RPTR FirstService;
- };
-
- struct AmigaCustomer
- {
- struct AmigaCustomer *NextAmigaCustomer;
- UWORD Flags;
- struct Task *Task;
- ULONG SignalMask;
- ULONG Reserved[4];
- };
-
- struct PCMemory
- {
- RPTR PCOffset;
- RPTR PCSegment;
- };
-
- struct ServiceData
- {
- ULONG ApplicationID;
- UWORD LocalID;
- UWORD Flags;
- UBYTE ServiceDataLock;
- UBYTE AmigaUserCount;
- UBYTE PCUserCount;
- UBYTE ReservedByte;
- UWORD MemSize;
- UWORD MemType;
- RPTR MemOffset;
- APTR AmigaMemPtr;
- struct PCMemory PCMemPtr;
- RPTR JRememberKey;
- RPTR NextServiceData;
- struct PCMemory FirstPCCustomer;
- struct AmigaCustomer *FirstAmigaCustomer;
- struct SignalSemaphore *Semaphore;
- ULONG ZaphodRserved[4];
- };
-
- #define ADDS_EXCLUSIVE 0x0001
- #define ADDS_TOPC_ONLY 0x0002
- #define ADDS_FROMPC_ONLY 0x0004
- #define ADDS_TOAmiga 0x0008
- #define ADDS_FROMAmiga 0x0010
- #define ADDS_LOCKDATA 0x0020
- #define SD_CREATED 0x0100
-
- #define GETS_WAIT 0x0001
- #define GETS_TOPC_ONLY 0x0002
- #define GETS_FROMPC_ONLY 0x0004
- #define GETS_TOAmiga 0x0008
- #define GETS_FROMAmiga 0x0010
- #define GETS_EXCLUSIVE 0x0020
- #define GETS_ALOAD_A 0x0040
- #define GETS_ALOAD_PC 0x0080
-
- #define JSERV_OK 0
- #define JSERV_NOJANUSMEM 1
- #define JSERV_NOAmigaMEM 2
- #define JSERV_NOPCMEM 3
- #define JSERV_NOSERVICE 4
- #define JSERV_DUPSERVICE 5
-
- #define SERVICE_DELETED 0x0001
- #define EXPUNGE_SERVICE 0x0002
- #define SERVICE_AmigaSIDE 0x0004
- #define Amiga_MEMPTR 0x0100
- #define PC_MEMPTR 0x0200
-
- struct JanusRemember
- {
- RPTR NextRemember;
- RPTR Offset;
- USHORT Size;
- USHORT Type;
- };
-
- #define MEMF_PARAMETER 0x0001
- #define MEMF_BUFFER 0x0002
- #define MEM_BYTEACCESS 0x0000
- #define MEM_WORDACCESS 0x1000
- #define MEM_GRAPHICACCESS 0x2000
- #define MEM_IOACCESS 0x3000
- #define MEM_ACCESSMASK 0x3000
- #define MEM_TYPEMASK 0x00FF
-
- struct SetupSig
- {
- struct Interrupt ss_Interrupt;
- struct Task *ss_TaskPtr;
- ULONG ss_SigMask;
- APTR ss_ParamPtr;
- ULONG ss_ParamSize;
- UWORD ss_JanusIntNum;
- };
-
- #define JSERV_MINT 0
- #define JSERV_GINT 1
- #define JSERV_CRT1INT 2
- #define JSERV_CRT2INT 3
- #define JSERV_ENBKB 4
- #define JSERV_LPT1INT 5
- #define JSERV_COM2INT 6
- #define JSERV_PCBOOTED 7
- #define JSERV_SCROLL 8
- #define JSERV_HARDDISK 9
- #define JSERV_READAmiga 10
- #define JSERV_READPC 11
- #define JSERV_AmigaCALL 12
- #define JSERV_PCCALL 13
- #define JSERV_AmigaSERVICE 14
- #define JSERV_PCSERVICE 15
-
- struct JanusMemHeader
- {
- UBYTE Lock;
- UBYTE Pad;
- APTR AmigaPtr;
- RPTR PCOffset;
- UWORD Used;
- UWORD Max;
- UWORD Free;
- };
-
- struct JIntTable
- {
- struct SetupSig *JanusInts[32];
- };
-
- struct JIntCallTable
- {
- UBYTE pcToAmiga;
- UBYTE amigaToPC;
- };
-
- struct DualPortedMemory
- {
- UBYTE Lock;
- UBYTE Pad;
- struct JanusMemHeader ParameterRAM;
- struct JanusMemHeader BufferRAM;
- RPTR JIntCallTable;
- RPTR JIntParamTable;
- UWORD JIntCount;
- ULONG SystemBits;
- UWORD JanusLibraryRevision;
- UWORD JanusLibraryVersion;
- UWORD JanusHandlerRevision;
- UWORD JanusHandlerVersion;
- UWORD BridgeBoardReady;
- };
-
- #define INTCALL_ACTION 127
- #define INTCALL_NONE 255
- #define AUTOBOOT_ON 1
- #define AUTOBOOT_OFF 0
- #define BB_READY 0x5442;
-
- struct TimeServReq
- {
- UWORD Year;
- UBYTE Month;
- UBYTE Day;
- UBYTE Hour;
- UBYTE Minutes;
- UBYTE Seconds;
- UBYTE String[27];
- UWORD Err;
- };
-
- #define TIMESERV_APPID 1L
- #define TIMESERV_LOCID 1L
-
- #endif
-
-